<template>
  <iconify
    v-bind="{ ...$attrs, class: className, style: styleName }"
    v-on="$listeners"
    @onLoad="$listeners.onLoad || (() => {})"
    @click.native="$listeners.click || (() => {})"
  />
</template>
<script>
import { Icon as iconify } from '@iconify/vue2'
export default {
  name: 'iconifyIcon',
  inheritAttrs: false, // 禁用将父组件的非 prop 特性（如 class）绑定到子组件根元素的行为
  components: { iconify },
  props: {
    // 通过props声明接收父组件传递的类
    className: {
      type: [Object, Array, String],
      default: ''
    },
    styleName: {
      type: [Object, Array, String],
      default: ''
    }
  },
  methods: {},
  created() {},
  mounted() {}
}
</script>
<style lang="scss" scoped></style>
